/*
 *  Filename: mpl3115.c
 *  Function: Header for Sensor MPL3115
 *  Created: 2017-06-15
 *  Version: 1.0
 *  Author: Bin
 */

#ifndef MPL3115
#define MPL3115

/*-------- Defines --------*/
#define MPL3115_ADDR 0xC0

#define MPL_STATUS  0x00
#define OUT_P_MSB   0x01
#define OUT_P_CSB   0x02
#define OUT_P_LSB   0x03
#define OUT_T_MSB   0x04
#define OUT_T_LSB   0x05

/*-------- Types --------*/
typedef struct {
    float Alti;
    float Temp;
} MPL3115_t;

/*-------- Exported functions --------*/
void MPL3115_Init(void);
void MPL3115_Update(MPL3115_t *p);

#endif
